package org.csu.wuliu.domain;

import java.io.Serializable;
import java.math.BigDecimal;

public class LineItem implements Serializable {
    private String orderId;
    private String itemId;
    private int number;
    private BigDecimal listprice;
    private BigDecimal total;

    public LineItem() {
    }

    public LineItem(String orderId, String itemId, int number, BigDecimal listprice) {
        this.orderId = orderId;
        this.itemId = itemId;
        this.number = number;
        this.listprice = listprice;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public BigDecimal getListprice() {
        return listprice;
    }

    public void setListprice(BigDecimal listprice) {
        this.listprice = listprice;
    }

    public BigDecimal calculateTotal() {
        total = listprice.multiply(new BigDecimal(number));
        return total;
    }
}
